<div class="admin">
    <form method="get" name="mform" id="mform" action="{:U('index')}">
        <div class="panel admin-panel">
            <div class="panel-head"><strong>订单管理</strong></div>
            <div class="table-tools clearfix ">
                <div class="float-left">
                    <div class="form-inline">
                        <div class="form-group">
                            <div class="field"><label>订单号：</label><input class="input input_small" type="text" name="order_sn" value="" /></div>
                            <div class="field"><label>收货人：</label><input class="input input_small" type="text" name="buyer_name" value="" /></div>
                            <div class="field"><label>下单时间：</label>
                                <input class="input input_big hasDatepicker" type="text" value="" id="query_start_time" name="query_start_time" readonly="readonly">至
                                <input class="input input_big hasDatepicker" type="text" value="" id="query_end_time" name="query_end_time" readonly="readonly">
                            </div>
                            <div class="form-button">
                            <button class="button bg-blue" type="submit">订单查询</button>
                        </div>
                        </div>
                    </div>
                </div>
            </div>
            <table class="table table-hover">
                <tr>
                    <th width="18%">订单号</th>
                    <th width="17%">支付单号</th>
                    <th width="10%">买家</th>
                    <th width="15%">下单日期</th>
                    <th width="10%">订单总额</th>
                    <th width="10%">支付方式</th>
                    <th width="10%">订单状态</th>
                    <th width="10%">操作</th>
                </tr>
                <foreach item='v' name='res'>
                    <tr>
                        <td>{$v['order_sn']}</td>
                        <td>{$v['pay_sn']}</td>
                        <td>{$v['user_name']}</td>
                        <td>{:date('Y-m-d H:i:s',$v['add_time'])}</td>
                        <td>{$v['goods_amount']}</td>
                        <td>{$v['payment_code']}</td>
                        <td>
                            <switch name="v['order_state']" >
                                <case value="0" >已取消</case>
                                <case value="10">待付款</case>
                                <case value="20">待发货</case>
                                <case value="30">已发货</case>
                                <case value="40">已收货</case>
                            </switch>
                        </td>
                        <td class="f-14 td-manage">
                            <a class="button bg-blue button-little" href="{:U('edit',array('order_id'=>$v['order_id']))}" title="编辑"><i class="icon-edit"></i>订单详情</a>
                        </td>
                    </tr>
                </foreach>
            </table>
            <div class="panel-foot text-center">
                <div class="pages">{$pages}</div>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript">
    $('#myform').layer({});
    
    $('#query_start_time').duxTime({
        timepicker: false,
    });
    $('#query_end_time').duxTime({
        timepicker: false,
    });
</script>